# Tox test runner configuration file.
#
# For more information, visit https://tox.readthedocs.io/en/latest/config.html.

[flake8]
application-import-names =
    sharpen
    tests
docstring-convention = google
exclude =
    .benchmarks/
    .cache/
    .hypothesis/
    .mypy_cache/
    .pytest_cache/
    .venv/
    tmp/
ignore =
    E203
    W503
import-order-style = google
max-complexity = 10
max-line-length = 80
per-file-ignores =
    scripts/*:B008
    **/__main__.py:B008

[testenv]
commands =
    poetry install --verbose
    poetry run pytest --cov
deps = poetry
description = Test Python code.

[testenv:lint]
commands =
    poetry run bandit -ilr src/
    poetry run black --check .
    poetry run python scripts/build_docs.py
    poetry run flake8 .
    poetry run nbqa flake8 .
    poetry run mypy .
deps = poetry
description = Run static analyzers on Python code.

[tox]
envlist = lint, py38, py39, py310, py311, py312
isolated_build = true

[tox:.package]
basepython = python3.11
